<?php
  require_once 'DB.php';
  include_once("./libraries/db.inc.php");
  include_once("./libraries/authentication.inc.php");
  include_once("./queries/adminJobHistory.inc.php");
  include_once("./libraries/util.inc.php");
  include_once("./libraries/displayUtils.inc.php");
  include_once("./libraries/recordset.inc.php");

  session_start();
  adminAuthenticate("login.php");

  $dataIndex = "jobQueueByUser";

  $connection = DB::connect($dsn, $options);
  if (DB::isError($connection)) {
    trigger_error($connection->getMessage(), E_USER_ERROR);
  }
  
  $displayPage = 1;
  $rs = job_History_By_User($connection, $dataIndex, $displayPage);

  //$displayPage = 1;
  $rs->setLinkParams(0, array("owner"), array(0), "jobHistoryList.php");
  //echo "about to call it\n";
  $rs->printNavigablePage($_SESSION["{$dataIndex}"]["title"],
                          $_SESSION["{$dataIndex}"]["message"],
                          $displayPage,
                          "adminJobHistorySummary.php");
  //echo "calledIt\n";
  cdbFinishPage();
  $connection->disconnect();
?>
